<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>002</title>
	</head>
	<body>
		<script type="text/javascript">
			//键盘按下
			document.onkeydown = function() {
				console.log("键盘按下了");
			}
			
			//键盘抬起
			document.onkeyup = function() {
				console.log("键盘抬起了");
			}
			
			//有字符输入
			document.onkeypress = function() {
				console.log("有字符输入了");
			}
		</script>
	</body>
</html>
